package com.huifai.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huifai.entity.SysDataPermission;
import com.huifai.mapper.SysDataPermissionMapper;
import com.huifai.service.ISysDataPermissionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wcj
 * @since 2019-08-26
 */
@Service
public class SysDataPermissionServiceImpl extends ServiceImpl<SysDataPermissionMapper, SysDataPermission> implements ISysDataPermissionService {




    @Override
    public List<SysDataPermission> findSysDataPermissionsByRoles(List<Long> roleIds) {
        QueryWrapper<SysDataPermission> queryWrapper = new QueryWrapper<>();
        queryWrapper.in("role_id",roleIds);
        return this.list(queryWrapper);
    }
}
